package com.xiyu.service.vo.mailbox.mail;

import com.xiyu.service.vo.mailbox.mail.baseVO.MailboxMailBase;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;

import jakarta.validation.Valid;
import com.xiyu.service.enums.common.CommonStatusEnum;
import com.xiyu.service.framework.validation.InEnum;
import org.springframework.format.annotation.DateTimeFormat;
    import static com.xiyu.service.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
    import java.time.LocalDateTime;

@Schema(description = "根据文件夹ID获取邮件信息")
@Data
@AllArgsConstructor
public class MailPageMailOutput extends MailboxMailBase {

    @Schema(description = "邮件审批主键ID")
    private Long approveId;

    @Schema(description = "邮件发件人")
    @Valid
    private List<from> froms;

    @Schema(description = "更新时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime updateTime;

    @Schema(description = "邮件标签")
    @Valid
    private List<label> labels;

    @Schema(description = "邮件审批状态")
    private Integer approveStatus;

    @Schema(description = "邮件主键ID")
    private Long id;

    @Schema(description = "邮件标签")
    @Data
    public static class label {

        @Schema(description = "")
        @Valid
        private labelFolder labelFolder;
    }

    @Schema(description = "")
    @Data
    public static class labelFolder {

        @Schema(description = "文件夹名称")
        private String name;

        @Schema(description = "颜色")
        private String color;
    }

    @Schema(description = "邮件发件人")
    @Data
    public static class from {

        @Schema(description = "发件人姓名")
        private String name;
    }
}